<?php include '_sidebar.php' ?>

<?php $c = array_key_exists("producto", $contenido) ? $contenido["producto"] : null ?>
<div class="span10">
    <form class="well" action="index.php?modulo=producto&accion=persist" method="POST">
        <label>Codigo</label>
        <input type="text" class="span4" <?php echo $c ? "readonly" : "" ?> name="codigo" placeholder="Ingrese codigo del producto" value="<?php echo $c ? $c["codigo"] : "" ?>">

        <label>Modelo</label>
        <input type="text" class="span4" name="modelo" placeholder="Zapatilla Marrel Outdoor II" value="<?php echo $c ? $c["modelo"] : "" ?>">

        <label>Descripcion</label>
        <input type="text" class="span4" name="descripcion" placeholder="Color verde, Talla 42" value="<?php echo $c ? $c["descripcion"] : "" ?>">

        <label>Tipo</label>
        <input type="text" class="span4" name="tipo" placeholder="Zapatilla" value="<?php echo $c ? $c["tipo"] : "" ?>">

        <label>Precio</label>
        <input type="text" class="span4" name="precio" placeholder="ingrese el precio del producto" value="<?php echo $c ? $c["precio"] : "" ?>">
        
        <label>Empresa</label>
        <input type="text" class="span4" name="rut" placeholder="Marrel" value="<?php echo $c ? $c["rut"] : "" ?>">

        <div class="form-actions">
            <button type="submit" class="btn btn-primary">Guardar</button>
            <button class="btn" onclick="window.location='index.php?modulo=producto'; return false;">Cancelar</button>
        </div>
    </form>
</div>